{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Basic CML processing workflow" ] }, { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [], "source": [ "import numpy as np\n", "import matplotlib.pyplot as plt\n", "import matplotlib as mpl\n", "import tqdm\n", "import xarray as xr\n", "import pandas as pd\n", "\n", "import pycomlink as pycml" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Load example data and do preprocessing\n", "\n", "We load the example data from one NetCDF file which contains the time series of 500 CMLs over 10 days. If you want to use your own data, e.g. from a CSV file, look at the respective example notebook for how to get started." ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
<xarray.Dataset> Size: 254MB\n",
"Dimensions: (time: 15840, cml_id: 500, channel_id: 2)\n",
"Coordinates:\n",
" * time (time) datetime64[ns] 127kB 2018-05-10 ... 2018-05-20T2...\n",
" * cml_id (cml_id) <U3 6kB '0' '1' '2' '3' ... '497' '498' '499'\n",
" length (cml_id) float64 4kB ...\n",
" site_a_latitude (cml_id) float64 4kB ...\n",
" site_a_longitude (cml_id) float64 4kB ...\n",
" site_b_latitude (cml_id) float64 4kB ...\n",
" site_b_longitude (cml_id) float64 4kB ...\n",
" * channel_id (channel_id) <U9 72B 'channel_1' 'channel_2'\n",
" frequency (cml_id, channel_id) float64 8kB ...\n",
" polarization (cml_id, channel_id) <U1 4kB ...\n",
"Data variables:\n",
" rsl (channel_id, cml_id, time) float64 127MB ...\n",
" tsl (channel_id, cml_id, time) float64 127MB ...<xarray.Dataset> Size: 2MB\n",
"Dimensions: (cml_id: 500, channel_id: 2, time: 264)\n",
"Coordinates:\n",
" * cml_id (cml_id) <U3 6kB '0' '1' '2' '3' ... '497' '498' '499'\n",
" length (cml_id) float64 4kB 6.179 5.673 7.52 ... 14.57 4.994\n",
" site_a_latitude (cml_id) float64 4kB 58.26 58.09 58.19 ... 57.77 57.07\n",
" site_a_longitude (cml_id) float64 4kB 1.388 1.637 1.359 ... 1.471 2.09\n",
" site_b_latitude (cml_id) float64 4kB 58.25 58.13 58.21 ... 57.83 57.07\n",
" site_b_longitude (cml_id) float64 4kB 1.304 1.59 1.461 ... 1.298 2.023\n",
" * channel_id (channel_id) <U9 72B 'channel_1' 'channel_2'\n",
" frequency (cml_id, channel_id) float64 8kB 2.491e+10 ... 2.598e+10\n",
" polarization (cml_id, channel_id) <U1 4kB 'V' 'V' 'H' ... 'V' 'V' 'V'\n",
" * time (time) datetime64[ns] 2kB 2018-05-10T01:00:00 ... 2018-...\n",
"Data variables:\n",
" R (cml_id, channel_id, time) float64 2MB 0.0 0.0 ... 0.0 0.0